package urban_seed_tha

import (
	"fmt"
	"gitee.com/theegg/go-brick/app/model/urban/urban_elements"
	"gitee.com/theegg/go-brick/app/service/app"
)

// 景点  seed
func InitPartnerTourElementsSeed() {

	items := make(map[int]urban_elements.UrbanElements)

	items[310001] = urban_elements.UrbanElements{
		Id:          310001,
		PartnerSign: "default",
		Lang:        "cn",

		Title:     "曼谷大皇宫",
		TitleEn:   "Bangkok Grand Palace",
		TypeId:    1,
		TypeSubId: 1004,
		Summary:   "紧邻湄南河，是曼谷中心内一处大规模古建筑群（计28座），总面积218400平方米。大皇宫始建于1782年，经历代国王的不断修缮扩建，终建成这规模宏大的大皇宫建筑群，至今仍金碧辉煌",
		Content:   "",

		OpenTime:    "07:00",
		CloseTime:   "19:00",
		OpenWeekDay: "1,2,3,4,5,6,7",

		Tags:         "历史沉淀,佛教艺术,泰国地标",
		FeeTicketHas: true,
		FeeInnerHas:  false,
		FeeAmount:    "500泰铢",

		Country:    "tha",
		ProvinceId: 3003,
		CityId:     3003001,
		Address:    "Na Phra Lan Rd, Khwaeng Phra Borom Maha Ratchawang, Khet Phra Nakhon, Krung Thep Maha Nakhon 10200泰国",

		CoordinateX: "11186774.935",
		CoordinateY: "1536253.57",
		PlusCode:    "",

		ImageCover: "",
		ImageList:  "",

		ImageCount:  0,
		ViewCount:   0,
		IsHot:       false,
		IsRecommend: false,
		Status:      1,
	}

	count := 0
	errCount := 0
	for _, item := range items {
		_, err := app.Db().Insert(item)
		if err != nil {
			fmt.Println(err.Error())
			errCount++
		} else {
			count++
		}
	}

	fmt.Printf("%5s|%25s|%10d|%8d|\n", "", "urban_elements", count, errCount)
}
